import 'package:division/division.dart';
import 'package:flutter/material.dart';
import 'package:s_mankey/config/resource_mananger.dart';
import 'package:s_mankey/config/router_config.dart';
import 'package:s_mankey/generated/I18n.dart';
import 'package:s_mankey/ui/page/moreWidget/select_city.dart';
import 'package:s_mankey/ui/widget/custom_list_cell.dart';

class MorePage extends StatefulWidget {
  @override
  _MorePage createState() => _MorePage();
}

class _MorePage extends State<MorePage> with AutomaticKeepAliveClientMixin {

  var list = [
//    {'leading': Icon(Icons.search, color: Colors.amber,), 'title': '学员认证', 'trailing': IconFonts.rightIcon, 'root': RouterName.studentAuthenticat},
    {'leading': Icon(Icons.settings, color: Colors.red,), 'title': '设置', 'trailing': IconFonts.rightIcon, 'root': RouterName.moreSetting},
  ];

  @override
  bool get wantKeepAlive => true;

  @override
  Widget build(BuildContext context) {

    return Scaffold(
      backgroundColor: Colors.white,
      body: Column(
        children: <Widget>[
          Container(
            child: Image.network(
              'https://api.in-monkeys.com/upload_admin/image/20190822/c2348b9919931ef0e56ef8f7307f7660.jpg',
              fit: BoxFit.cover,
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: 10),
            decoration: BoxDecoration(
              color: Colors.white,
            ),
            child: MediaQuery.removePadding(
              removeTop: true,
              context: context,
              child: ListView.builder(
                shrinkWrap: true,
                physics: NeverScrollableScrollPhysics(),
                itemCount: list.length,
                itemBuilder: (BuildContext context, int index) {
                  return CustomListViewCell(
                    rootString: list[index]['root'],
                    index: index,
                    leading: list[index]['leading'],
                    title: list[index]['title'],
                    subTitle: '',
                    trailing: list[index]['trailing']);
                },
              ),
            ),
          ),
          Expanded(
            child: Container(
              color: Colors.white,
            ),
          ),
        ],
      ),
    );
  }


}
